﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:MVVM_CAD="clr-namespace:MVVM_CAD" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" mc:Ignorable="d" x:Class="MVVM_CAD.MainWindow"
        Title="MainWindow" Height="800" Width="1024"
        WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen" WindowState="Maximized">
	<Window.Resources>
		<Style x:Key="ToolButton" TargetType="{x:Type Button}">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Grid>
							<i:Interaction.Triggers>
								<i:EventTrigger EventName="MouseLeave">
									<ei:GoToStateAction x:Name="OnMouseLeaveForButton" StateName="OnMouseLeave"/>
								</i:EventTrigger>
								<i:EventTrigger EventName="MouseEnter">
									<ei:GoToStateAction x:Name="OnMouseEnterForButton" StateName="OnMouseOver"/>
								</i:EventTrigger>
							</i:Interaction.Triggers>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="ButtonMouseOver">
									<VisualStateGroup.Transitions>
										<VisualTransition GeneratedDuration="0:0:0.2"/>
									</VisualStateGroup.Transitions>
									<VisualState x:Name="OnMouseLeave">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="rectangle">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle">
												<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="OnMouseOver">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="rectangle">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle">
												<EasingDoubleKeyFrame KeyTime="0" Value="0.275"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Rectangle Fill="#FF838383" RadiusY="5" RadiusX="5" Stroke="#FF6C6C6C"/>
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
							<Rectangle x:Name="rectangle" RadiusY="5" RadiusX="5" Stroke="#FF6C6C6C" Opacity="0" Visibility="Visible">
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="Black" Offset="0.151"/>
										<GradientStop Color="White" Offset="1"/>
										<GradientStop Color="White" Offset="1"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsFocused" Value="True"/>
							<Trigger Property="IsDefaulted" Value="True"/>
							<Trigger Property="IsMouseOver" Value="True"/>
							<Trigger Property="IsPressed" Value="True"/>
							<Trigger Property="IsEnabled" Value="False"/>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Window.Resources>
	<Window.DataContext>
		<Binding Path="Main" Source="{StaticResource Locator}"/>
	</Window.DataContext>
    <Grid>
    	<Grid.Background>
    		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    			<GradientStop Color="#FF19537B" Offset="0"/>
    			<GradientStop Color="White" Offset="1"/>
    		</LinearGradientBrush>
    	</Grid.Background>
    	<MVVM_CAD:CanvasView Margin="82,59,82,47"/>
    	<MVVM_CAD:ToolsMenu x:Name="MenuBar" HorizontalAlignment="Left" Margin="-81,59,0,43" Height="Auto" Width="85"/>
    	<MVVM_CAD:ObjectDescriptionControl HorizontalAlignment="Right" Margin="0,59,-14.287,47" Width="250" Height="Auto"/>
    	<MVVM_CAD:DrawedFiguresList Height="141" Width="325" Margin="357,0,321,24" VerticalAlignment="Bottom"/>
    	<MVVM_CAD:FileMenu HorizontalAlignment="Left" Height="32.5" Margin="2.833,2.667,0,0" VerticalAlignment="Top" Width="211.071"/>
    	<MVVM_CAD:SaveFileDialog Margin="322,162,424.623,0" Visibility="Visible" HorizontalAlignment="Stretch" Height="126" VerticalAlignment="Top" Width="262"/>
    	<MVVM_CAD:OpenFileDialog Width="262" HorizontalAlignment="Stretch" Margin="322,162,424.623,0" Height="126" VerticalAlignment="Top"/>
    	<Label Content="{Binding SceneManagerViewModel.Status}" HorizontalAlignment="Left" Height="29" VerticalAlignment="Bottom" Width="421" IsEnabled="False"/>
    </Grid>
</Window>
